#!/bin/sh
app_port=5011


ipaddr=`/sbin/ifconfig  | grep 'inet addr:'| grep -v '127.0.0.1' |cut -d: -f2 | awk '{ print $1}'`
echo "check.sh port=$app_port"

netstat  -ntulp | grep $app_port
if [ $? -eq 0 ];then
echo  " java proess is running"
else
echo "server $ipaddr reboot is starting, please wait for moment!"
fi


#cd /u01/weblogic10/bea/user_projects/domains/air/ 
#file=`ls -ltR | grep nohup |head -n 1| awk '{print $9}'`
#cat $file |grep "<Server started in RUNNING mode>" > /tmp/log.log

#mail -s "server $ipaddr reboot status at $(date +%Y%m%d-%H%M)" chengyanwei@china-sss.com < /tmp/log.log
